import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'dashboard',
          name: '首页',
          meta: {
            icon: 'dashboard'
          },
          component: BlankView,
          children: [
            {
              path: 'workplace',
              name: '工作台',
              meta: {
                page: {
                  closable: false
                }
              },
              component: () => import('@/pages/dashboard/workplace'),
            },
          ]
        },
        {
          path: 'promotion',
          name: '推广',
          meta: {
            icon: 'form',
          },
          component: PageView,
          children: [
            {
              path: 'advering',
              name: '头条',
              component: BlankView,
              children: [
                {
                  path: 'advers',
                  name: '广告组',
                  component: () => import('@/pages/advering/advers/AdverList'),
                },
                {
                  path: 'addadver',
                  name: '添加广告组',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/advers/AddAdver'),
				        },
                {
                  path: 'editaddver',
                  name: '修改广告组',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/advers/EditAddver'),
                  },
                {
                  path: 'plans',
                  name: '计划',
                  component: () => import('@/pages/advering/plans/PlansList'),
                },
                {
                  path: 'addplan',
                  name: '添加计划',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/plans/AddPlan'),
                },
                {
                  path: 'editplan',
                  name: '修改计划',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/plans/EditPlan'),
				        },
                {
                  path: 'originality',
                  name: '创意',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/originality/OriginaList'),
                },
                {
                  path: 'chooseaplan',
                  name: '选择计划',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/originality/ChooseAPlan'),
                  },

                {
                  path: 'addorigin',
                  name: '添加创意',
                  meta: {
                    invisible: true,
                  },
                  component: () => import('@/pages/advering/originality/AddOrigin'),
                  },
                  {
                    path: 'editorigin',
                    name: '修改创意',
                    meta: {
                      invisible: true,
                    },
                    component: () => import('@/pages/advering/originality/EditOrigin'),
                    },
                {
                  path: 'keyword',
                  name: '关键词',
                  component: () => import('@/pages/advering/keywords/KeywordsList'),
                }
              ]
            },{
                path: 'batch',
                name: '批量创建',
                component: () => import('@/pages/batching/batch'),
            },{
              path: 'plan',
              name: '批量创建广告计划',
              meta: {
                invisible: true,
              },
              component: () => import('@/pages/batching/plan'),
            },
            {
              path: 'originality',
              name: '批量创建广告创意',
              meta: {
                invisible: true,
              },
              component: () => import('@/pages/batching/originality'),
            },{
              path: 'batchrule',
              name: '批量创建规则',
              meta: {
                invisible: true,
              },
              component: () => import('@/pages/batching/batchrule'),
            },{
              path: 'batchtask',
              name: '批量任务',
              component: () => import('@/pages/batchtasking/batchtask'),
            },{
              path: 'conversions',
              name: '转化配置',
              component: () => import('@/pages/conversioning/conversions'),
            },
            {
              path: 'targetpage',
              name: '定向包',
              component: () => import('@/pages/targets/targetpage'),
            },
          ]
        },
        {
          path: 'list',
          name: '报表',
          meta: {
            icon: 'table'
          },
          component: PageView,
          children: [
            {
              path: 'search',
              name: '广告报表',
              component: () => import('@/pages/list/search/SearchLayout'),
              children: [
                {
                  path: 'article',
                  name: '账户报表',
                  component: () => import('@/pages/list/search/ArticleList'),
                },
                {
                  path: 'application',
                  name: '广告组报表',
                  component: () => import('@/pages/list/search/ApplicationList'),
                },
                {
                  path: 'project',
                  name: '广告计划报表',
                  component: () => import('@/pages/list/search/ProjectList'),
                },
                {
                  path: 'project',
                  name: '创意报表',
                  component: () => import('@/pages/list/search/ProjectList'),
                }
              ]
            }
          ]
        },
        {
          path: 'details',
          name: '资产',
          meta: {
            icon: 'profile'
          },
          component: BlankView,
          children: [
            {
              path: 'basic',
              name: '基础详情页',
              component: () => import('@/pages/detail/BasicDetail')
            },
            {
              path: 'advance',
              name: '高级详情页',
              component: () => import('@/pages/detail/AdvancedDetail')
            }
          ]
        },
        {
          path: 'result',
          name: '工具',
          meta: {
            icon: 'check-circle-o',
          },
          component: PageView,
          children: [
            {
              path: 'success',
              name: '成功',
              component: () => import('@/pages/result/Success')
            },
            {
              path: 'error',
              name: '失败',
              component: () => import('@/pages/result/Error')
            }
          ]
        },
        {
          path: 'exception',
          name: '财务',
          meta: {
            icon: 'warning',
          },
          component: BlankView,
          children: [
            {
              path: '404',
              name: 'Exp404',
              component: () => import('@/pages/exception/404')
            },
            {
              path: '403',
              name: 'Exp403',
              component: () => import('@/pages/exception/403')
            },
            {
              path: '500',
              name: '表单',
              component: () => import('@/pages/form/basic')
            }
          ]
        },
        {
          path: 'components',
          name: '账户',
          meta: {
            icon: 'appstore-o'
          },
          component: PageView,
          children: [
            {
              path: 'adaccount',
              name: '广告投放账号',
              component: () => import('@/pages/account/AdAccount')
            },
            // {
            //   path: 'palette',
            //   name: '颜色复选框',
            //   component: () => import('@/pages/components/Palette')
            // },
            // {
            //   path: 'table',
            //   name: '高级表格',
            //   component: () => import('@/pages/components/table')
            // }
          ]
        },
        // {
        //   name: '验权表单',
        //   path: 'auth/form',
        //   meta: {
        //     icon: 'file-excel',
        //     authority: {
        //       permission: 'form'
        //     }
        //   },
        //   component: () => import('@/pages/form/basic')
        // },
        // {
        //   name: 'Ant Design Vue',
        //   path: 'antdv',
        //   meta: {
        //     icon: 'ant-design',
        //     link: 'https://www.antdv.com/docs/vue/introduce-cn/'
        //   }
        // },
        // {
        //   name: '使用文档',
        //   path: 'document',
        //   meta: {
        //     icon: 'file-word',
        //     link: 'https://iczer.gitee.io/vue-antd-admin-docs/'
        //   }
        // }
      ]
    },
  ]
}

export default options
